Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): no-unknown-property for eslint-plugin-react #1875

Merged
merged 11 commits into from
Jan 7, 2024

Conversation

@github-actions github-actions bot added the A-linter Area - Linter label Jan 2, 2024
Copy link

codspeed-hq bot commented Jan 2, 2024

CodSpeed Performance Report

Merging #1875 will not alter performance

Comparing XantreGodlike:react-no-unknown-property (46c7383) with main (f46ed71)

Summary

✅ 14 untouched benchmarks

@XantreDev XantreDev force-pushed the react-no-unknown-property branch from b10d4ad to 49286f8 Compare January 4, 2024 09:42
@XantreDev XantreDev marked this pull request as ready for review January 4, 2024 12:55
@XantreDev
Copy link
Contributor Author

#1022

@XantreDev
Copy link
Contributor Author

@camc314 Can u review it please?

@Boshen Boshen requested a review from camc314 January 6, 2024 08:29
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

I wonder whether some of the hashmaps -> vec strings should be converted to phf hash maps to improve performance.

e.g.

static ref ATTRIBUTE_TAGS_MAP: HashMap<&'static str, Vec<&'static str>> = HashMap::from([

would become

const ATTRIBUTE_TAGS_MAP: Map<&'static str, Map<&'static str, bool>> = phf_map! {
    /* entries */
};

The benchmarks show no perf regression, but currently, it doesn't look like we benchmark any large react codebases however this should be addressed by #1884.

@XantreDev
Copy link
Contributor Author

XantreDev commented Jan 7, 2024

This looks good to me.

I wonder whether some of the hashmaps -> vec strings should be converted to phf hash maps to improve performance.

e.g.

static ref ATTRIBUTE_TAGS_MAP: HashMap<&'static str, Vec<&'static str>> = HashMap::from([

would become

const ATTRIBUTE_TAGS_MAP: Map<&'static str, Map<&'static str, bool>> = phf_map! {
    /* entries */
};

The benchmarks show no perf regression, but currently, it doesn't look like we benchmark any large react codebases however this should be addressed by #1884.

I think replacement most of hash maps to compile time phc_map is a good idea.
I think Vec-s should be replaced with phc_set, not phc_map

@XantreDev XantreDev force-pushed the react-no-unknown-property branch from f76ae11 to 4125dd8 Compare January 7, 2024 11:18
@XantreDev
Copy link
Contributor Author

Check Unused Dependencies have failed, because of unused rayon in language server, so I was forced to remove it from deps to pass CI

@XantreDev XantreDev requested a review from camc314 January 7, 2024 12:01
@camc314
Copy link
Contributor

camc314 commented Jan 7, 2024

I think replacement most of hash maps to compile time phc_map is a good idea.
I think Vec-s should be replaced with phc_set, not phc_map

yeah that's what i mean - thank you

@XantreDev XantreDev requested a review from camc314 January 7, 2024 12:20
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@camc314
Copy link
Contributor

camc314 commented Jan 7, 2024

#1875 (comment)

looks like a false positive #1903 seems to have the same degregation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants